<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">发布对象</h4>
</div>
<div class="modal-body">

    <table id="table_publishObject"></table>

</div>

<script>

    <c:choose>
    <c:when test="${type=='role'}">
    $('#table_publishObject').bootstrapTable({
        data:${data},
        columns: [
            {
                formatter: function (value, row, index) {
                    return index + 1;
                }
            }, {
                field: 'name',
                title: '名称',
                switchable: false
            }, {
                field: 'remark',
                title: '备注'
            }
        ]
    });
    </c:when>
    <c:otherwise>
    $('#table_publishObject').bootstrapTable({
        data:${data},
        columns: [
            {
                formatter: function (value, row, index) {
                    return index + 1
                }
            },
            {
                field: 'name',
                title: '姓名'
            },
            {
                field: 'idCard',
                title: '身份证号'

            }, {
                field: 'phone',
                title: '联系方式'

            }
        ]
    });
    </c:otherwise>
    </c:choose>


</script>
